<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
p{
    width : 200px;
    height : 200px;
    background-color : pink;
}
</style>
</head>
<body>
<p id="p1"></p>
<script>
var year = parseInt(prompt("请输入一个年份:"))
var is = year % 4 == 0 && year % 100 != 0 || year % 400 == 0;
var msg = is ? "是闰年" : "不是闰年";
//document.write(msg)
var p1 = document.getElementById("p1");
p1.innerHTML = msg
</script>
</body>
</html>